import request from "@/utils/request";
export const getquanxian = () => {
  return request({
    url: "rights/list",
    method: "get",
  });
};
export const getjueselist = () => {
  return request({
    url: "roles",
    method: "get",
  });
};
export const getjueselistId = (id, id1) => {
  return request({
    url: `roles/${id}/rights/${id1}`,
    method: "delete",
  });
};
export const gettree = () => {
  return request({
    url: "rights/tree",
    method: "get",
  });
};
export const getkeyid = (data, roleid) => {
  return request({
    url: `roles/${roleid}/rights`,
    method: "post",
    data,
  });
};
export const gettianjia = (data) => {
  return request({
    url: "roles",
    method: "post",
    data,
  });
};
export const getbianjishuju = (id, data) => {
  return request({
    url: `roles/${id}`,
    method: "get",
    data,
  });
};

export const getbianji = (data) => {
  return request({
    url: `roles/${data.roleId}`,
    method: "put",
    data,
  });
};

export const getshanchu = (id) => {
  return request({
    url: `roles/${id}`,
    method: "delete",
    data: null,
  });
};
